This example changes the column divider style when the user clicks a heading.
Private Sub DataGrid1_HeadClick (ColIndex As Long)
If DataGrid1.Columns(ColIndex).DividerStyle <> 5 Then
DataGrid1.Columns(ColIndex).DividerStyle = _
DataGrid1.Columns(ColIndex).DividerStyle + 1
Else
DataGrid1.Columns(ColIndex).DividerStyle = 0
End If
End Sub